<template>
	<view>
		<!-- 列表样式 -->
		<block v-for="(item,index) in list"  :key="index" >
		  <common-list :item="item" :index ="index" ></common-list>	 
	  </block>
	  
	  <!-- 右下角按钮 -->
	  <y-Fab :bottom="140" :right="40" :btnList="fabList" @click="handleFab" />
	</view>
</template>

<script>
	import commonList from '@/components/common/common-list.vue'
	export default {
		components:{
		commonList	
		},
		data() {
			return {
				list:[
					{
					  username:"呢称",
					  userpic:"../../static/default.jpg",
					  newstime:"2020-03-04 下午04:30",
					  isFollow:false,
					  title:"公司拥有800万开发者用户，几十万应用案例、12亿手机端月活用户，数千款uni-app插件、70+微信/qq群",
					  titlepic:"../../static/demo/datapic/11.jpg",
					  support:{
						  type:"support",
						  support_count:1,
						  unsupport_count:2
					  },
					  comment_count:3,
					  share_num:2
					},
					{
					  username:"呢称",
					  userpic:"../../static/default.jpg",
					  newstime:"2020-03-04 下午04:30",
					  isFollow:false,
					  title:"公司拥有800万开发者用户，几十万应用案例、12亿手机端月活用户，数千款uni-app插件、70+微信/qq群",
					  titlepic:"../../static/demo/datapic/11.jpg",
					  support:{
						  type:"support",
						  support_count:1,
						  unsupport_count:2
					  },
					  comment_count:3,
					  share_num:2
					},
					{
					  username:"呢称",
					  userpic:"../../static/default.jpg",
					  newstime:"2020-03-04 下午04:30",
					  isFollow:false,
					  title:"公司拥有800万开发者用户，几十万应用案例、12亿手机端月活用户，数千款uni-app插件、70+微信/qq群",
					  titlepic:"../../static/demo/datapic/11.jpg",
					  support:{
						  type:"support",
						  support_count:1,
						  unsupport_count:2
					  },
					  comment_count:3,
					  share_num:2
					}
				],
				//fab的设置
				fabList: [
					{
						bgColor: '#16C2C2',
						text: '发布',
						fontSize: 28,
						color: '#fff'
					},
					{
						bgColor: '#37b59d',
						text: '分享',
						fontSize: 28,
						color: '#fff'
					}
				]
			}
		},
		onLoad() {

		},
		methods: {
            //点击右下角tab按钮
            handleFab(e) {
            	let index = e.index;
            	switch (index) {
            		case 0:
            			uni.navigateTo({
            				url: '../push/push'
            			});
            			break;
            		case 1:
            			console.log(1);
            			break;
            	}
            }
		}
	}
</script>

<style>
	
</style>
